|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcz.zcu.fav.kiv.ppr.Farmer
public class Farmer
PPR1 cz.zcu.fav.kiv.ppr Farmer.java
| Constructor Summary | |
|---|---|
Farmer(int p_threads,
int p_lines)
Constructor of the class Farmer.java |
|
| Method Summary | |
|---|---|
java.util.ArrayList<Occurence> |
getStatistics(java.util.List<java.lang.String> data,
java.lang.String findString)
getStatistics Method wait until all works done, then return results. |
IPieceOfWork |
getWork()
getWork Create new piece of work |
void |
submitWork(IPieceOfWork results,
int threadId)
submitWork This method is called from Worker, when work is done |
boolean |
waitForWork(int threadNumber)
waitForWork If is not work, thread waits and if all work is done, return false |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Farmer(int p_threads,
int p_lines)
p_threads - p_lines - | Method Detail |
|---|
public boolean waitForWork(int threadNumber)
threadNumber -
public IPieceOfWork getWork()
public void submitWork(IPieceOfWork results,
int threadId)
results - threadId - -
ID of thread
public java.util.ArrayList<Occurence> getStatistics(java.util.List<java.lang.String> data,
java.lang.String findString)
data - findString -
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||